package com.newly.api.business.feign;

import com.newly.common.base.constants.ServerUriConstant;
import com.newly.common.base.entity.R;
import com.newly.common.base.entity.business.Dto.DataQueryDto;
import com.newly.common.base.entity.business.Po.CheckRecord;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;

/**
 * 运营监测--数据查询client
 * @anthor sbq
 * @date 2021/10/29 9:57
 */
@Api(tags = "数据查询api")
@FeignClient(path = ServerUriConstant.NEWLY_BUSINESS_QUERY, name = ServerUriConstant.NEWLY_BUSINESS_SERVICE_NAME)
public interface DataQueryClient {


    @ApiOperation("导出检测记录")
    @GetMapping("/export")
    void export(HttpServletResponse response, DataQueryDto dataQueryDto);

    @ApiOperation("分页查询检测记录")
    @GetMapping("/getPage")
    R getPage(DataQueryDto dataQueryDto);

    @ApiOperation("获取详情")
    @GetMapping("/getDetailsById")
    R getDetailsById(Integer id);

    @ApiOperation("审核")
    @PostMapping("/audit")
    R audit(@Valid @RequestBody CheckRecord checkRecord);

}
